package com.java.base.exercise.proxy.staticproxy;

/**
 * @Author RenPu
 * @Date 2022/1/5 11:39
 * @Version 1.0
 * @Description: 定义代理对象 ---静态代理编写
 **/
public class HelloServiceProxy implements HelloService {


    private HelloService taget;


    public HelloServiceProxy(HelloService taget) {
        this.taget = taget;
    }

    @Override
    public String say() {
        System.out.println("代理对象执行前。。。。。。。。。。。。。。。");
        String say = taget.say();
        System.out.println(say);
        System.out.println("代理对象。。。。。。。执行后。。。。。。。。");
        return say;
    }
}
